package ldh.fx.adminfx;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.Pane;
import javafx.stage.Stage;
import javafx.stage.StageStyle;
import ldh.fx.adminfx.commpont.LoginPane;
import ldh.fx.adminfx.util.StageUtil;

public class LoginGui extends Application {

    private Pane loginPane;

    @Override
    public void start(Stage primaryStage) {
        StageUtil.setStage(primaryStage);
        loginPane = new LoginPane();
        ((LoginPane) loginPane).setConsumer((Void)->{
            primaryStage.close();
        });
        Scene scene = ((LoginPane) loginPane).createScene();
        primaryStage.initStyle(StageStyle.TRANSPARENT);
        primaryStage.setScene(scene);

        primaryStage.show();
    }
}
